package com.swfee.qinben.httpactions;

import java.util.List;

import com.swfee.qinben.dto.req.AppointmentReqDto;
import com.swfee.qinben.dto.req.SubmitAppointmentReqDto;
import com.swfee.qinben.dto.rsp.AppointmentRspDto;
import com.swfee.qinben.dto.rsp.ResultRspDto;
import com.swfee.qinben.httpactions.base.ReqBaseAction;

public class AppointmentAction extends ReqBaseAction<AppointmentReqDto,AppointmentRspDto> {

	
	public AppointmentAction() {
		super();
		setDefaultRspClass(AppointmentRspDto.class);
	}
	
	@Override
	public String getBaseActionUrl() {
		return "/webService/MedicalCare.CommonServices/Appointment.asmx";
	}
	
	
	/**
	 * 
	 * @return
	 */
	public List<AppointmentRspDto> getAllAppointments(){
		String action = "/GetAllAppointments";
		AppointmentReqDto req = new AppointmentReqDto();
		return doHttpForList(req, action);
	}
	
	
	public ResultRspDto submitAppointment(SubmitAppointmentReqDto req ){
		String action = "/SubmitAppointment";
		return (ResultRspDto) doHttpForObject(req, action,ResultRspDto.class);
	}
	

	
	
	
}
